﻿using System;
using System.Collections.Generic;
using System.Text;

namespace DDotNet.ORM.ORMapping.Attribute
{
    /// <summary>
    /// Attribute to Mapping a Single Entity to DataBase Connection Settings
    /// </summary>
    [AttributeUsage(AttributeTargets.Class)]
    public sealed class DBMapping : System.Attribute
    {
        #region Constructor

        /// <summary>
        /// 
        /// </summary>
        /// <param name="connectionStringName">Chave da String de Conexão desta Entidade</param>
        public DBMapping(string connectionStringName)
        {
            this._ConnectionStringKey = connectionStringName;
        }

        #endregion

        #region Fields

        private string _ConnectionStringKey = string.Empty;

        #endregion

        #region Properties

        /// <summary>
        /// Retorna a Chave da String de Conexão desta Entidade
        /// </summary>
        public string ConnectionStringKey
        {
            get { return _ConnectionStringKey; }
        }

        #endregion
    }
}
